# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=domain-analyzer
pkgver=0.8.1
pkgrel=4
groups=('blackarch' 'blackarch-recon')
pkgdesc='Finds all the security information for a given domain name.'
arch=('any')
url='http://sourceforge.net/projects/domainanalyzer/'
license=('GPL2')
depends=('python2' 'python2-httplib2' 'python2-dnspython')
source=("http://downloads.sourceforge.net/project/domainanalyzer/domain_analyzer_v$pkgver.tar.gz")
sha512sums=('76c8ef3881d966295fb2b51fc087ceaedd526a962f164a0f4bd0607c3606ecaea9ac1173fc9a260210321831665062df4b9ea75e8498e812a7ce6f104816ebe9')

prepare() {
  find . -type f -name '*.py' -exec sed -i 's|/usr/bin/env python|/usr/bin/env python2|' {} \;
}

package() {
  install -Dm 755 domain_analyzerdomain_analyzer.py "$pkgdir/usr/bin/$pkgname"
  install -Dm 755 domain_analyzeransistrm.py \
    "$pkgdir/usr/bin/ansistrm.py"
  install -Dm 755 domain_analyzercrawler.py \
    "$pkgdir/usr/bin/domain-analyzer-crawler"
  install -Dm 755 domain_analyzerpyText2pdf.py \
    "$pkgdir/usr/bin/domain-analyzer-pytext2pdf"
  install -Dm 644 domain_analyzerREADME "$pkgdir/usr/share/doc/$pkgname/README"
}

